﻿using CleanArchitecture.Infrastructure.Entities.Business;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CleanArchitecture.Infrastructure.DataMapping.Business
{
    public partial class ActiveLogMap : NowaEntityTypeConfiguration<ActiveLog>
    {
        #region Methods

        /// <summary>
        /// Configures the entity
        /// </summary>
        /// <param name="builder">The builder to be used to configure the entity</param>
        public override void Configure(EntityTypeBuilder<ActiveLog> builder)
        {
            builder.ToTable("bus_activelog");
            builder.HasKey(log => log.Id);
            builder.Property(log => log.ActiveName).HasMaxLength(100);
            builder.Property(log => log.EntityName).HasMaxLength(100);
            builder.Property(log => log.Detail).HasMaxLength(1000);
            builder.Property(log => log.IpAddress).HasMaxLength(100);

            base.Configure(builder);
        }

        #endregion
    }
}
